<style>
#load{
    width:100%;
    height:100%;
    position:fixed;
    z-index:9999;
    background:url("images/loading_bar.gif") no-repeat center center #fff;
}
</style>
<script>
document.onreadystatechange = function () {
  var state = document.readyState
  if (state == 'interactive') {
       document.getElementById('contents').style.visibility="hidden";
  } else if (state == 'complete') {
      setTimeout(function(){
		 if(typeof sessionStorage["admin_user_id"]=='undefined'){
			 document.getElementById('interactive');
			 document.getElementById('load').style.visibility="hidden";
			 document.getElementById('contents').style.visibility="visible";
		 }else{
			var pageUrl = JSON.parse(sessionStorage["pageUrl"]);
			window.location=pageUrl;
		 }
      },300);
  }
}
</script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script src="js/webserviceurl.js"></script>
<script src="js/validations.js"></script>
<script src="js/commonfunctions.js"></script>
<script src="js/text.js"></script>
<link href="css/style.css" rel="stylesheet">
<link href="css/default.css" rel="stylesheet">
<link href="css/responsive.css" rel="stylesheet">
<script>
$(window).load(function() {
$('#header').load('header.html');
$('#footer').load('footer.html');
});
</script>
<div id="load"></div>
<div id="contents">
  <div id="header"></div>
	<div class="container-fluid">
		<div class="row-fluid container_bg">
		<div class="container_plr">
			<div class="container_title">
				<!--<div><h1>Login</h1></div>-->
				<div class="mar_top login_div">
				<div class="brg">
				<div class="h2_title_bg"><h2>Login in with your Medicart Account </h2></div>
				<form id="login">
				<p>If you already have an Medicart account, you may use that to sign in</p>
				<fieldset id="inputs">
					<span id="usernameError" class="valid_message"></span>
					<input id="username" type="text" placeholder="Username">
					</fieldset>
					<fieldset id="inputs">
					<span id="pwdError" class="valid_message_2"></span>
					<input id="password" type="password" placeholder="Password" >
				</fieldset>
				<label class="checkbox">
					<!--<input type="checkbox"> Remember me:--><a href="forgoten.html" style="float:right;">Forgot your password?</a>
				</label>
				<fieldset id="actions">
				<input type="button" id="submit" onclick="loginForm()" value="SIGN IN"><span id="reload"></span>
				</fieldset>
				</form>
				<div id="logsucess" style="color:red"></div>
				<div id="accoutDiv"></div>
				</div>
				
				 <div class="tagline">Need an account? <a href="register.html" id="sign-up-link">Sign up now</a></div>
				<div>
				</div>
				 

			</div>
			</div>
		</div>
	</div>
	</div>
	<div id="footer"></div>
	</div>
</html>
<script>
$('#password').keypress(function(e){
	if( e.keyCode == 13 ){
		loginForm();	
	}
});
</script>